#include "../include/colour.h"

Colour::Colour()
{
  red   = 0.0;
  green = 0.0;
  blue  = 0.0;
  alpha = 0.0;
}

void Colour::clear(void)
{
  red   = 0.0;
  green = 0.0;
  blue  = 0.0;
  alpha = 0.0;
}

void Colour::set(float pred, float pgreen, float pblue, float palpha)
{
  red   = pred;
  green = pgreen;
  blue  = pblue;
  alpha = palpha;
}

float Colour::getRed(void)
{
  return red;
}

float Colour::getGreen(void)
{
  return green;
}

float Colour::getBlue(void)
{
  return blue;
}

float Colour::getAlpha(void)
{
  return alpha;
}

Colour Colour::multiply(const Colour &b) {
	Colour result;
	Colour a = *this;
	result.set(a.red * b.red , a.green * b.green , a.blue * b.blue,1.0);
	return result;
}


Colour Colour::dot(const Colour &b){

}

Colour Colour::multiply(double d) {
	Colour result;
	Colour a = *this;
	result.set(a.red * d , a.green * d , a.blue * d,1.0);
	return result;
}

Colour Colour::add(const Colour &b){
	Colour result;
	result.clear();
	Colour a = *this;
	result.set(a.red + b.red , a.green + b.green , a.blue + b.blue,1.0);
	return result;
}
